
import { api } from 'boot/axios'
// const baseURL = "http://121.5.100.40:19171/"
const login = (params = {
  username: '',
  password: ''
}) => {
  return new Promise((resolve, reject) => {
    api.post('/api/authority/login/', {
      username: params.username,
      password: params.password
    }).then((res) => {
      resolve(res.data)
      console.log(res)
    }).catch(function (error) {
      reject(error)
      console.log(error)
    })
  })
}

export { login }
